/*****************************************************************************
 * vlc_seek_time_dialog.c : Go to specific time dialog
 *****************************************************************************/

#include "seektimedialog.h"

#include <vlc/vlc.h>
#include <vlc_interface.h>

#include "gtk_extra/gtk_extra.h"

/* Widget */

static void vlc_seek_time_dialog_class_init (VlcSeekTimeDialogClass *klass);
static void vlc_seek_time_dialog_init       (VlcSeekTimeDialog *dialog);

G_DEFINE_TYPE (VlcSeekTimeDialog, vlc_seek_time_dialog, GTK_TYPE_DIALOG);

/* Internal */

/* Callbacks */
static void cb_clicked_go_button (GtkButton *button, gpointer user_data);

static void
vlc_seek_time_dialog_class_init (VlcSeekTimeDialogClass *klass)
{}

static void
vlc_seek_time_dialog_init (VlcSeekTimeDialog *dialog)
{

  GtkWidget *button;
  GtkWidget *frame;
//  GtkWidget *label;
  gchar *str;

  gtk_window_set_title (GTK_WINDOW (dialog), _("Go to time"));

  str = qt_to_gtk_mnemonic_string (_("Go to time:"));
  frame = gtk_frame_new (str);
  g_free (str);
  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame, FALSE, FALSE, 4);
  gtk_widget_set_size_request (frame, 250, 150);

//    label = gtk_label_new ("hh : mm : ss");
//    gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);

  str = qt_to_gtk_mnemonic_string (_("&Go"));
  button = gtk_button_new_with_mnemonic (str);
  g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (cb_clicked_go_button), dialog);
  g_free (str);
  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), button, FALSE, FALSE, 0);

  gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);

  gtk_widget_show_all (GTK_WIDGET (dialog));

}

/* create our widget */

GtkWidget*
vlc_seek_time_dialog_new (GtkWindow *parent)
{

  GtkWidget *dialog;

  dialog = g_object_new (VLC_TYPE_SEEK_TIME_DIALOG, NULL);
  
  if (parent != NULL)
   {
     gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); 
   }
   
  return dialog;
  
}

static void
cb_clicked_go_button (GtkButton *button, gpointer user_data)
{



}
